using System;
using System.Collections.Generic;
using System.Text;
using Shc.Sql;
using Shc.Json;
namespace CLZ.Data
{
	public static class TableShippingStatus
	{
		public const string Table = "ShippingStatus";
		public const string ShippingStatusID = "ShippingStatusID";
		public const string ShippingStatusName = "ShippingStatusName";
	}
	
	[Serializable]
	public class BaseShippingStatus
		: IDbSessionEntity, IJsonClass
	{
		int m_ShippingStatusID;
		/// <summary>
        /// 
        /// </summary>
        public int ShippingStatusID
        {
            get { return m_ShippingStatusID; }
            set { m_ShippingStatusID = value; }
        }
		
		string m_ShippingStatusName;
		/// <summary>
        /// 
        /// </summary>
        public string ShippingStatusName
        {
            get { return m_ShippingStatusName; }
            set { m_ShippingStatusName = value; }
        }
		
		
		#region IDbSessionEntity Members
		public void ReadDBData(RowDataReader reader)
        {
            m_ShippingStatusID = reader[TableShippingStatus.ShippingStatusID];
            m_ShippingStatusName = reader[TableShippingStatus.ShippingStatusName];
        }
		
		public void WriteDBData(RowDataWriter writer)
        {
            writer.SetPrimaryKey(TableShippingStatus.ShippingStatusID, PrimaryKeyType.Identity, ShippingStatusID);
			writer[TableShippingStatus.ShippingStatusName] = ShippingStatusName;
        }

        public void SetIdentityAfterInsert(DBObject idd)
        {
            m_ShippingStatusID = idd;
        }
		
		public string TableName
        {
            get { return TableShippingStatus.Table; }
        }
		#endregion
		
		#region IJsonClass Members

        public void JsonDeSerializeObj(JsonHashTable hashToRead)
        {
             m_ShippingStatusID = hashToRead["ShippingStatusID"];
			 
             m_ShippingStatusName = hashToRead["ShippingStatusName"];
			 
        }

        public void JsonSerializeObj(JsonHashTable hashToFill)
        {
            hashToFill["ShippingStatusID"] = ShippingStatusID;
			 
            hashToFill["ShippingStatusName"] = ShippingStatusName;
			 
        }

        #endregion
		
	}
}
